package com.ps.service.dept;

import com.ps.entity.Result;
import com.ps.pojo.dept.Department;
import com.ps.service.BaseService;

public interface DepartmentService extends BaseService<Department> {

	public Result addDepartment(Department department);
	
	public Result addDepartment(Department department, Integer [] wpIds);
	
	public Result deleteDepartment(Integer departmentId,Integer inputerId);
	
	public Result updateDepartment(Department department);
	
	public Result queryDepartmentDetail(Integer departmentId);
	
	public String findXmlTree(Integer areaId);
	
	/**
	 * 是否存在子部门
	 * @param departmentId
	 * @return
	 */
	public boolean existsChild(Integer departmentId);
	
	/**
	 * 是否存在岗位
	 * @param departmentId
	 * @return
	 */
	public boolean existsWorkPosition(Integer departmentId);
	
	
	
	
	
	/**
	 * 更新部门及其岗位
	 * @param dept
	 * @param wpIds
	 * @return
	 */
	public Result updateDepartment(Department dept, Integer [] wpIds);
	
	/**
	 * 更新部门及其岗位关联员工为0的岗位
	 * @param dept
	 * @param wpIds
	 * @return
	 */
	public Result updateDeptWPAndCountPersonIsZero(Department dept, Integer [] wpIds);

}
